package com.oig.sys.auth.vo;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "菜单显示列")
public class ResourceColumnVo {

    @Schema(description = "主键id")
    private Integer id;

    @Schema(description = "用户个性化菜单id")
    private Integer userColumnId;

    @Schema(description = "编码")
    private String code;

    @Schema(description = "菜单id")
    private Integer resourceId;

    @Schema(description = "列名称")
    private String columnName;

    @Schema(description = "列别名--通用查询返回的是map-key是别名")
    private String columnField;

    @Schema(description = "列实体属性代码")
    private String columnProperty;

    @Schema(description = "列所属表--可以不要了")
    private String columnTableName;

    @Schema(description = "列所属表代码--可以不要了")
    private String columnTable;

    @Schema(description = "数据库列代码--可以不要了")
    private String columnCol;

    @Schema(description = "列排序序号")
    private Integer listSort;

    @Schema(description = "列枚举json")
    private String enumValueJson;

    @Schema(description = "列是否是主键列,默认第一行是主键")
    private Boolean isPrimaryKey=false;
    @Schema(description = "列是否固定--看是否能支持")
    private Boolean isOrderFlag = false;
    @Schema(description = "列是否允许个性化")
    private Boolean isChangeFlag = true;
    @Schema(description = "列是否显示")
    private Boolean isShowFlag = true;

    @Schema(description = "列显示对齐方式")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String showAlign;
    @Schema(description = "列显示宽度")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String showWidth;
    @Schema(description = "列显示样式json")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String showClassJson;
    @Schema(description = "创建人名称")
    private String createUserName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "创建时间")
    private java.util.Date createTime;

    @Schema(description = "最后修改人名称")
    private String lastUpdateName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "最后修改时间")
    private java.util.Date lastUpdateTime;


    //column_value_type //列值类型 0-数值（浮点数+整数）1-整数  2-字符串 3-日期 4-日期时间 5-时间 6-枚举 当枚举时enum_value_json有值
    @Schema(description = "列值类型: 0-数值（浮点数+整数）1-整数  2-字符串 3-日期 4-日期时间 5-时间 6-枚举 当枚举时enum_value_json有值")
    private String columnValueType ;

    //query_flag  //列是否支持查询
    @Schema(description = "列是否支持查询: 默认0-否 1-是（支持）")
    private String queryFlag ;

    @Schema(description = "列支持查询时，默认是否显示 0-否 1-是（收起）")
    private String queryShowFlag;

    //query_type    //列查询组件类型
    @Schema(description = "列查询组件类型: 0-文本 1-between  2-枚举下拉框 3-查询下拉框 4-弹框查询  当=1时 取enum_value_json值 2~3默认支持多选")
    private String queryType ;

    //query_type_api    //查询列依赖接口
    @Schema(description = "查询列依赖接口 当queryType=3/4 需要")
    private String queryTypeApi ;

    //query_sort        //列查询组件显示顺序号
    @Schema(description = "列查询组件显示顺序号")
    private Integer querySort ;
}
